Skip to content

NIFI-14777 Restore capability from NiFi 1.x to view upstream/downstre… - #11582

Open
markobean wants to merge 8 commits into
apache:mainfrom
markobean:NIFI-14777
Open

markobean wants to merge 8 commits into
apache:mainfrom
markobean:NIFI-14777

Conversation

@markobean

Copy link
Copy Markdown
Contributor

…am connections. View connections > upstream/downstream is available in the context menu from a variety of components: input/output ports, processors, process groups, remote process groups and funnels.

Summary

In NiFi 1.x, there was a context menu option for View Connections > upstream/downstream. This is available from any component, but it is particularly useful for input/output ports. The reason is that the connections to ports are not visible on the graph at the same level as the ports themselves. The user must go to the parent process group, and then there is ambiguity which connections are connected to which ports in cases where there are multiple connections and ports on the process group.

A key feature of the View Connections table is that each item in the table is clickable and will navigate to the selected component or connection.

Restoring this feature makes it far easier to navigate the graph and identify complex routing/connectivity issues in the flow.

NIFI-14777

Tracking

Please complete the following tracking steps prior to pull request creation.

Issue Tracking

Pull Request Tracking

  • Pull Request title starts with Apache NiFi Jira issue number, such as NIFI-00000
  • Pull Request commit message starts with Apache NiFi Jira issue number, as such NIFI-00000
  • Pull request contains commits signed with a registered key indicating Verified status

Pull Request Formatting

  • Pull Request based on current revision of the main branch
  • Pull Request refers to a feature branch with one commit containing changes

Verification

Verification was performed by interacting with the graph and testing a variety of scenarios including:

  • viewing connections from processors, input/output ports, process groups, remote process groups and funnels
  • disabling access to upstream and downstream connected components via access policies
  • renaming connected components to verify the View Connections table is updated similarly
  • clicking on each item in the View Connections table navigates to the selected component or connection

Build

  • Build completed using ./mvnw clean install -P contrib-check
    • JDK 21
    • JDK 25

Licensing

  • New dependencies are compatible with the Apache License 2.0 according to the License Policy
  • New dependencies are documented in applicable LICENSE and NOTICE files

Documentation

  • Documentation formatting appears as expected in rendered files

@pvillard31 pvillard31 added the ui Pull requests for work relating to the user interface label Aug 24, 2026
@Freedom9339

Copy link
Copy Markdown
Contributor

I tested the functionality of this and it looks good. The pop up window shows accurate connections and the buttons redirect to the appropriate component. I would suggest using different Icons for the context menu options so that the arrows are pointing up and down, to correspond with "Upstream" and "Downstream". Maybe slanted up/down arrows? Just a thought.

@markobean

Copy link
Copy Markdown
Contributor Author

I tested the functionality of this and it looks good. The pop up window shows accurate connections and the buttons redirect to the appropriate component. I would suggest using different Icons for the context menu options so that the arrows are pointing up and down, to correspond with "Upstream" and "Downstream". Maybe slanted up/down arrows? Just a thought.

Thanks @Freedom9339. I updated the arrows, as suggested. The upstream context menu item shows an arrow pointing up and to the left, and downstream shows down and to the right. It's slightly more intuitive and looks good.

@rfellows

Copy link
Copy Markdown
Contributor

Will review...

@rfellows rfellows left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for restoring View Connections. The effect/filter path and unauthorized/empty handling look directionally right, but this isn’t merge-ready yet.

Verified locally on this branch (npx nx test nifi --runInBand): 6 failed / 2,825 passed, all in component-connections-dialog.component.spec.ts. Lint and a development build passed.

Must-fix before merge:

  1. The new dialog tests fail (empty mock store + assertions still targeting goTo() / a partial row shape).
  2. Remote-port cells navigate with the port id and ComponentType.RemoteProcessGroup.
  3. Source/Destination Process Group cells navigate to /process-groups/{groupId}/ProcessGroup/{groupId} when the endpoint is the group currently on the canvas.

The five-column clickable table is a reasonable UX, but it should follow the existing dialog listing-table pattern (bounded scroll, sticky header, striped rows) used by Local Changes and Change Version, and use <a> for in-cell navigation rather than mat-button.

Comment on lines +125 to +126
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the sticky header and striped rows used by other listing tables.

Suggested change
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr>
<tr mat-row *matRowDef="let row; let even = even; columns: displayedColumns" [class.even]="even"></tr>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sticky header was added. I attempted to add the striped rows with the even setting. I do not see it rendered though. I'll keep looking at it, but I'd appreciate insights you may have.

…am connections. View connections > upstream/downstream is available in the context menu from a variety of components: input/output ports, processors, process groups, remote process groups and funnels.
…in the parent group to support port-to-port connection in sibling PGs

Update table formatting with fixed header and scrollable
…to match current state of upstream/downstream dialog functionality; original was from a older implementation
@markobean

Copy link
Copy Markdown
Contributor Author

Thanks for restoring View Connections. The effect/filter path and unauthorized/empty handling look directionally right, but this isn’t merge-ready yet.

Verified locally on this branch (npx nx test nifi --runInBand): 6 failed / 2,825 passed, all in component-connections-dialog.component.spec.ts. Lint and a development build passed.

Must-fix before merge:

  1. The new dialog tests fail (empty mock store + assertions still targeting goTo() / a partial row shape).
  2. Remote-port cells navigate with the port id and ComponentType.RemoteProcessGroup.
  3. Source/Destination Process Group cells navigate to /process-groups/{groupId}/ProcessGroup/{groupId} when the endpoint is the group currently on the canvas.

The five-column clickable table is a reasonable UX, but it should follow the existing dialog listing-table pattern (bounded scroll, sticky header, striped rows) used by Local Changes and Change Version, and use <a> for in-cell navigation rather than mat-button.

@rfellows Thanks for taking the time to review and catch a few things that needed attention.

I'm made numerous updates.

  1. The tests were refactored completely. The original submission had tests leftover from the original implementation. They are now current and all pass with npx nx test nifi --runInBand.
  2. Remote port components are no longer clickable in the table since they are not rendered on the local canvas.
  3. Any source/destination process group which is the current process group is non-clickable
  4. Table "buttons" were replaced with more native and elements.
  5. Syntax for styles were updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ui Pull requests for work relating to the user interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants